package com.xinhe.web.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;


public class PropertyTool {
    public static String getValue(String fileName, String valueName) {
        try {
            Properties properties = new Properties();
            File jarResourceFile = FileUtil.getJarResourceFile(fileName);
            if (jarResourceFile != null && jarResourceFile.exists()) {
                properties.load(new FileInputStream(jarResourceFile));
            }
            String value = properties.getProperty(valueName);
            return value;
        } catch (IOException e) {
            e.printStackTrace();

            return null;
        }
    }
}

